<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>登入页面</title>
    <link rel="stylesheet" href="/static/layui/css/layui.css">
    <script src="/static/layui/layui.js"></script>
    <script src="/static/layui/lay/modules/form.js"></script>
</head>
<style>
    .el-form-item__content{
        display: flex;
        align-items: center;
    }
    .loginContainer{
        border-radius: 15px;
        background-clip: padding-box;
        margin: 180px auto;
        width: 400px;
        padding: 35px 35px 25px 35px;
        background: #ffffff;
        border: 1px solid #eaeaea;
        box-shadow: 0 0 25px #cac6c6;
    }
    .loginTitle{
        margin: 10px auto 20px auto;
        text-align: center;
        color: #505458;
    }
</style>
<body>
<div class="el-form-item__content">
    <form class="layui-form loginContainer" method="post" action="/doLogin">
        <h3 class="loginTitle">系统登入</h3>
        <div class="layui-form-item">
            <label class="layui-form-label">用户名</label>
            <div class="layui-input-block">
            <input name="username" type="text" lay-verify="required" required autocomplete="off" class="layui-input"
                      value="admin"   placeholder="请输入用户名" >
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">密码</label>
            <div class="layui-input-block">
                <input name="password" type="password" required lay-verify="required" autocomplete="off" class="layui-input"
                       value="123456"   placeholder="请输入密码" >
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="formDemo">登入</button>
            </div>
        </div>

<!--        <el-button type="primary" style="width: 100%;" >登入</el-button>-->
    </form>
</div>
</body>
<script>

    layui.use('form', function(){
        var form = layui.form;

        //监听提交
        form.on('submit(formDemo)', function(data){
            //layer.msg(JSON.stringify(data.field));
            return true;
        });
    });
</script>
</html>